<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	</head>
<script type="text/javascript">
	
	$(document).ready(function(){
		$("ul li:eq(3)").addClass("active");
	});
	
	
	function check(){
	var tel=document.f.tel.value;
	if(tel.length==0||tel.substring(0,tel.length)==0){
	alert("电话号码不能为空格或空！");
	return false;
	}
	var tt=document.f.tt.value;
	if(tt.length==0||tt.substring(0,tt.length)==0){
	alert("报修信息不能为空格或空！");
	return false;
	}
	window.alert("提交成功");
	document.f.action="repair"
	
	}
	
	
	function checktel(){
	var tel=document.f.tel.value;
	if(tel.length==0||tel.substring(0,tel.length)==0){
	alert("电话号码不能为空格或空！");
	}
	}
</script>

		<form  name="f"   onsubmit="return check()" method="post">
			<div class="data_form" >
				
					<table align="center" border="0">
				
					<tr>
							<td width=""><font color="red">*</font>寝室号：</td>
							
							<td width="80%"><h2 class="data_form">${id}栋${room }寝室 </h2></td>
						</tr>
					<tr>
							<td><font color="red">*</font>日期：</td>
							<td><input type="text" id="date"  name="date" value="${time }"  style="margin-top:5px;height:30px;" readonly="readonly" /></td>
						</tr>
						<tr>
							<td><font color="red">*</font>姓名：</td>
							<td><input type="text" id="name"  name="name" value="${name }"  style="margin-top:5px;height:30px;" onblur="checkname()"/></td>
						</tr>
						<tr>
							<td><font color="red">*</font>联系方式：</td>
							<td><input type="text" id="tel"  name="tel" value=""  style="margin-top:5px;height:30px;" onblur="checktel()"/></td>
						</tr>
						<tr>
							<td><font color="red">*</font>报修内容：</td>
							<td><textarea rows="5" cols="" name="tt" id="tt"></textarea></td>
						</tr>
						
						<tr>
				<td><input type="hidden" name="id" value="${id}"/></td>
				<td><input type="hidden" name="room" value="${room }"/>
				</td>
					</tr>
						
						<tr>
						<td><input type="submit" class="btn btn-primary" value="提交" /></td>
						<td>&nbsp;<button class="btn btn-primary" type="button" onclick="javascript:window.history.back(-1)">返回</button></td>
						</tr>
					</table>
				
					
					<div align="center">
						<font id="error" color="red">${error }</font>
					</div>
			</div>
		</form>
		
		</html>